package com.shoulei.designpattern.factorypattern;

/**
 * @ClassName:FactoryPatternDemo
 * @Descrition:
 * @Author:shoulei
 * @Date:2019/3/31 16:45
 * @Verson:
 */
public class FactoryPatternDemo {

    public static void main(String[] args) {
        ShapeFactory sf = new ShapeFactory();
        //square对象
        sf.getShape("square").draw();
        //circle对象
        sf.getShape("circle").draw();
        //rectagnel对象
        sf.getShape("rectangle").draw();
    }
}
